import axios from 'axios'

// 1. baseUrl(配置公共的基础配置)
const baseUrl = 'http://123.207.32.32:8000'
axios.defaults.baseURL = baseUrl
axios.defaults.timeout = 10000
axios.defaults.headers = {}

/* axios.get('home/multidata').then((res) => {
	console.log('res', res)
}) */

// axios发送多个请求(只有所有请求都成功了, 才会成功返回)
axios
	.all([
		axios.get('/home/multidata'),
		axios.get('http://123.207.32.32:9001/lyric', {
			params: {
				id: 500665346,
			},
		}),
	])
	.then((res) => {
		console.log('res.data', res.data)
	})
